Retrieve the records that two tables don't have in common
If you have two tables that have similar data, such as two lists (tables) of customers, and each list has some entries that aren't included on the other list, you can create a query that returns only the records from the first table that do not match the records from the second table.
- Create a query in Microsoft Query, and add both tables to the query.
- To join the fields that match in two
tables (for example, the Customer ID field from two customer lists),
drag the field in the first table to the second table.
- In the Join dialog box, click option 2, and then click OK.
- In the Fields pane, on the Field pop-up menu, click the joined field
from the first table to add it to the query.
- In the Fields pane, add a field other than the joined field from the second table. Choose a field that has data for every record in the second table. For example, if you joined the Customer ID fields in the two tables, you might add the Customer Name field from the second table.
- In the Criteria box below the field you added in step 5, type Is Null
- Click Test! to see the records in the first table that aren't included in the second table.
- Add any additional fields that you want in the query.
Note If you also want to see the records in the second table that don't match records in the first table, create a second query in which you follow these same steps, but make the second table first, and vice versa.
Related topics
Add or remove fields
How joins affect the result set in a query